<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const reg = /(T|U|N|M)+/
        const reg2 = /[TUNM]+/
        if (reg.test('AA')) {
            console.log(true)
        }

        if (reg2.test('aas')) {
            console.log('reg2 true')
        }

        const reg3 = /([GDRG]).\1/
        console.log(reg3.test('DDD'))
        console.log('GA'.match(reg3))
        if (reg3.test('GBG')) {
            console.log('reg3 true')
        }

        const reg4 = /[HAT]/
        if (reg4.test('HH')) {
            console.log('reg4 true')
        }
    </script>
</body>

</html>